package cn.doit.scala.day01.block

import java.util.Random

/**
 * @DATE 2021/12/24/10:21
 * @Author MDK
 * @Version 2021.2.2
 * */
object C01_If02 {
  def main(args: Array[String]): Unit = {
    val arr: Array[Any] = Array[Any]("java", "scala", 12, 17, 23, 100.0)
    for (elem <- arr) {
     if(elem.isInstanceOf[Int]){
       val i = elem.asInstanceOf[Int]
       if(i<20){
         println(s"$i 小于20的值")
       }
     }

    }
  }
}
